package com.homedo.odin.solution.dao;

import com.homedo.core.common.base.dao.BaseDao;
import com.homedo.odin.solution.model.entity.UserPayOrder;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * <p> 用户支付订单表 Mapper 接口 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
public interface UserPayOrderMapper extends BaseDao<UserPayOrder> {

    UserPayOrder queryUserPayOrder(@Param("businessId") Long businessId, @Param("userId") Integer userId);

    List<UserPayOrder> queryOrderByBusinessId(@Param("businessId") Long businessId,
            @Param("businessType") Integer businessType, @Param("status") Integer status);

    Integer queryFreeSolutionDownloadCount(@Param("userId") Integer userId, @Param("actionType") Integer actionType);

    List<UserPayOrder> queryFinancialListForPri(@Param("businessType") Integer businessType,
            @Param("createStartDate") Date createStartDate, @Param("createEndDate") Date createEndDate);

    BigDecimal queryFinancialCount();

    UserPayOrder getPayOrderByOrderNo(@Param("orderNo") Long orderNo);

    Integer updateOrderStatus(@Param("orderNo") Long orderNo, @Param("status") Integer status);

    Integer updatePayModel(@Param("orderNo") Long orderNo, @Param("payMode") Integer payMode);
}